#pragma once
#include "afxcmn.h"

#include "GridListCtrlEx\CGridListCtrlGroups.h"
#include "afxwin.h"
// CDlgComm dialog

class CDlgComm : public CDialogEx
{
	DECLARE_DYNAMIC(CDlgComm)

public:
	CDlgComm(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgComm();

public:
	CImageList m_ImageList;

	CSerialPort m_SerialPort;

public:
	void initSpin();
	BOOL LoadImageToList(CString strFilePathName);
	BOOL LoadBitmapToList(CString strFileName, int i);
	void initListCtrl();

	void EnumSerialPort();

// Dialog Data
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DLG_COMM };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	CSpinButtonCtrl m_spinOil;
	CGridListCtrlGroups m_ListCtrl;
	CSpinButtonCtrl m_spinElectric;
	CSpinButtonCtrl m_spinCharging;
	CComboBox m_cmbSerialPort;
	afx_msg void OnBnClickedButtonOpenClose();
	afx_msg void OnBnClickedButtonSmoking();
	afx_msg void OnBnClickedButtonCharging();
	afx_msg void OnBnClickedButtonTrouble();
	CComboBox m_cmbTrouble;
};
